package com.dog.basics.service.mtkj;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dog.basics.bean.dto.admin.mtkj.ShopOrderFromDto;
import com.dog.basics.bean.dto.api.mtkj.*;
import com.dog.basics.bean.model.mtkj.MtOrder;
import com.dog.basics.bean.vo.admin.mtkj.AdminShopOrderXqVo;
import com.dog.basics.bean.vo.admin.mtkj.ShopOrderVo;
import com.dog.basics.bean.vo.api.mtkj.ApiOrderPrepayVo;
import com.dog.basics.bean.vo.api.mtkj.ApiShopOrderVo;
import com.dog.basics.bean.vo.api.mtkj.ApiShopOrderXqVo;
import com.dog.basics.bean.vo.api.mtkj.ApiSjDataVo;
import com.dog.basics.common.util.PageParam;

/**
 * <p>
 * 订单表 服务类
 * </p>
 *
 * @author wph
 * @since 2020-11-09
 */
public interface IMtOrderService extends IService<MtOrder> {
    /**
     * @Description: 分页订单列表(pc)
     * @Param: OrderFromDto
     * @return: IPage<PlatePageVo>
     * @Author: wph
     * @Date:
     */
    IPage<ShopOrderVo> getPageList(PageParam page, ShopOrderFromDto obj);

    /**
     * @Description: 分页订单列表API用户
     * @Param: OrderFromDto
     * @return: IPage<PlatePageVo>
     * @Author: wph
     * @Date:
     */
    IPage<ApiShopOrderVo> getApiPageList(PageParam page, ApiShopOrderFromDto obj);

    /**
     * @Description: 分页订单列表API商户
     * @Param: OrderFromDto
     * @return: IPage<PlatePageVo>
     * @Author: wph
     * @Date:
     */
    IPage<ApiShopOrderVo> getApiSjPageList(PageParam page, ApiShopOrderFromDto obj);

    /**
     * @Description: 获取商家的经营数据
     * @Param: CashWithdrawalAddDto
     * @return: Boolean
     * @Author: wph
     * @Date: 2020/05/29  0027
     */
    ApiSjDataVo getApiSjJyObj(ApiSjDataFromDto obj);

    /**
     * @Description: 订单详情 app
     * @Param: CashWithdrawalAddDto
     * @return: Boolean
     * @Author: wph
     * @Date: 2020/05/29  0027
     */
    ApiShopOrderXqVo getApiObjXq(Long id);

    /**
     * @Description: 订单详情通过订单编号
     * @Param: CashWithdrawalAddDto
     * @return: Boolean
     * @Author: wph
     * @Date: 2020/05/29  0027
     */
    ApiShopOrderXqVo getApiObjByOrderNoXq(String orderNo);

    /**
     * @Description: 订单详情pc
     * @Param: CashWithdrawalAddDto
     * @return: Boolean
     * @Author: wph
     * @Date: 2020/05/29  0027
     */
    AdminShopOrderXqVo getObjXq(Long id);


    /**
     * @Description: 增加订单(商品的)单商品直接下单
     * @Param: OrderAddDto
     * @return: Boolean
     * @Author: wph
     * @Date: 2020/05/29  0027
     */
    ApiOrderPrepayVo saveObj(ApiShopOrderAddDto obj);

    /**
     * @Description: 购物车直接下单
     * @Param: OrderAddDto
     * @return: Boolean
     * @Author: wph
     * @Date: 2020/05/29  0027
     */
    ApiOrderPrepayVo saveBasketObj(ApiOrderBasketAddDto obj);

    /**
     * @Description: 取消订单
     * @Param: ids
     * @return: Boolean
     * @Author: wph
     * @Date: 2020/05/29  0027
     */
    Boolean deleteObj(Long id);


    /**
     * @Description: 小程序微信 Order订单 - 支付回调
     * @Param: ids
     * @return: Boolean
     * @Author: wph
     * @Date: 2020/05/29  0027
     */
    Boolean wxMiniPayLowerOrderCallback(String xmData);

    /**
     * @Description: 申请退款
     * @Param: ids
     * @return: Boolean
     * @Author: wph
     * @Date: 2020/05/29  0027
     */
    Boolean applyreFund(ApiOrderRefundAddDto obj);

    /**
     * @Description: 确认退款(pc)
     * @Param: OrderFromDto
     * @return: IPage<PlatePageVo>
     * @Author: wph
     * @Date:
     */
    Boolean editOrderInfoFund(ApiOrderRefundEditDto obj);

    /**
     * @Description: 确认收货
     * @Param: ids
     * @return: Boolean
     * @Author: wph
     * @Date: 2020/05/29  0027
     */
    Boolean conOrder(Long orderId);

    /**
     * 订单发货
     *
     * @param orderId
     * @return
     * @author fengjk
     */
    Boolean sendOrder(Long orderId);

    /**
     * @Description: 是否在配送范围内
     * @Param: OrderAddDto
     * @return: R
     * @Author: wph
     * @Date:
     */
    Boolean sfSend(ApiShopOrderSendFromDto obj);

    /**
     * @Description: 支付结果的校验
     * @Param: ids
     * @return: Boolean
     * @Author: wph
     * @Date: 2020/05/29  0027
     */
    Boolean paymentResultVerification(String outTradeNo);
}
